import makeRequest from '../utils/request';

// 登录接口
export const login = async (data: { username: string; password: string }) => {
  return makeRequest<string>('/user/login', {
    data,
    method: 'POST',
  });
}

// 注册接口
export const register = async (data: { username: string; password: string }) => {
  return makeRequest<string>('/user/register', {
    data,
    method: "POST",
  });
}